using UnityEngine;
using System.Collections;

[ExecuteInEditMode]
public class MakeMarker : MonoBehaviour {
	
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnDrawGizmos(){
		
		Gizmos.color = Color.red;
		
		//Linha de baixo
		Vector3 pos0 = Camera.current.ScreenToWorldPoint(new Vector3(0,0,1));
		Vector3 pos1 = Camera.current.ScreenToWorldPoint(new Vector3(Camera.current.pixelWidth,0,1));
		
		//Linha 1
		Vector3 pos2 = Camera.current.ScreenToWorldPoint(new Vector3(0,Camera.current.pixelHeight/4,1));
		Vector3 pos3 = Camera.current.ScreenToWorldPoint(new Vector3(Camera.current.pixelWidth,Camera.current.pixelHeight/4,1));		
		
		//Linha 2
		Vector3 pos4 = Camera.current.ScreenToWorldPoint(new Vector3(0,Camera.current.pixelHeight/4 + Camera.current.pixelHeight/4,1));
		Vector3 pos5 = Camera.current.ScreenToWorldPoint(new Vector3(Camera.current.pixelWidth,Camera.current.pixelHeight/4 + Camera.current.pixelHeight/4,1));		
		
		//Linha 3
		Vector3 pos6 = Camera.current.ScreenToWorldPoint(new Vector3(0,Camera.current.pixelHeight/4 + Camera.current.pixelHeight/4 + Camera.current.pixelHeight/4,1));
		Vector3 pos7 = Camera.current.ScreenToWorldPoint(new Vector3(Camera.current.pixelWidth,Camera.current.pixelHeight/4 + Camera.current.pixelHeight/4 + Camera.current.pixelHeight/4,1));
		
		//Linha de cima
		Vector3 pos8 = Camera.current.ScreenToWorldPoint(new Vector3(0,Camera.current.pixelHeight,1));
		Vector3 pos9 = Camera.current.ScreenToWorldPoint(new Vector3(Camera.current.pixelWidth,Camera.current.pixelHeight,1));
		
		//Desenha as linhas
		Gizmos.DrawLine(pos0,pos1);
		
		Gizmos.DrawLine(pos2,pos3);

		Gizmos.DrawLine(pos4,pos5);
		
		Gizmos.DrawLine(pos6,pos7);
		
		Gizmos.DrawLine(pos8,pos9);
		
	}
}
